class CalendarController < ApplicationController
  before_filter :current_user
  
  def index
    @page_title = "Calendar"
    @month = (params[:month] || Time.zone.now.month).to_i
    @year = (params[:year] || Time.zone.now.year).to_i

    @shown_month = Date.civil(@year, @month)

    @event_strips = Event.event_strips_for_month(@shown_month).each do |event_strip|
      event_strip.select! do |event| 
        event.nil? || event.display?
      end
    end
  end
  
end
